<?php
namespace Admin\Logic;
use \Think\Model;
class OperauthLogic extends Model{
	
	protected $tableName	= 'operauth';
	
	/*
	 * 获取指定行内容
	 * condition	过滤条件，以数组形式
	 */
	public function getList($condition=array()){

		return	M($this->tableName)->where($condition)->order('id')->select();

	}
	
	/*
	 * 获取指定行的权限名
	 * condition	过滤条件，以数组形式
	 */	
	public function getOAName($id){

		return	M($this->tableName)->where('id='.$id)->getField("oname");

	}
	
	/*
	 * 获取所属功能分组
	 * oa_id	过滤条件，值为下一级id
	 */	
	public function getFGid($oa_id){
		$FGid					= M($this->tableName)->getFieldById($oa_id,'fid');
		return	$FGid;
	}		 
	
}
